home *** CD-ROM | disk | FTP | other *** search
- Path: fido.asd.sgi.com!austern
- From: johnw@jove.acs.unt.edu (John R. Williams)
- Newsgroups: comp.std.c++
- Subject: Re: #ifdef XXXX
- Date: 08 Feb 1996 15:57:47 PST
- Organization: University of North Texas
- Approved: austern@isolde.mti.sgi.com
- Message-ID: <4fe1jt$scn@hermes.acs.unt.edu>
- References: <1996Feb1.092058.4745@iiasa.ac.at>
- NNTP-Posting-Host: isolde.mti.sgi.com
- X-Original-Date: 8 Feb 1996 23:39:41 GMT
- X-Newsreader: TIN [version 1.2 PL2]
- X-Auth: PGPMoose V1.1 PGP comp.std.c++
- iQBVAwUBMRqODEy4NqrwXLNJAQFAXwH9FV/+TCB5sLG/f+KZ6eQQ2y5fOWagVz97
- 0Nde8ll8de5hVS4wCAMzseD5+Uhnfum/oqxwG0Mw2+ikNh6AYgBJSw==
- =gy3i
- Originator: austern@isolde.mti.sgi.com
-
- Marek MAKOWSKI (marek@iiasa.ac.at) wrote:
- > Would not it be sensible to add to the preprocessing a directive
- > that would stop processing the current file ? Something like
-
- > #ifdef XXXX
- > #exit
-
- > this would safe processing (sometimes very long) file in the common
- > situations:
-
- > #ifdef XXXX
- > // a (possibly) long header file hear
- > #endif /* ifdef XXXX*/
-
- I think it would be even better to make "#pragma once" (a common C
- extension, AFAIK) into a standardized directive ("#once"?). This would
- probably save an average of 30 characters per header (the most annoying
- ones in the whole language(s), IMO).
-
- OTOH I can see how #exit would have good uses.
-
- Also something I have often wished for was something like #warning which
- would cause the compiler to emit a warning.
- ---
- [ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu.
- Contact address: std-c++-request@ncar.ucar.edu. The moderation policy is
- in http://reality.sgi.com/employees/austern_mti/std-c++/policy.html. ]
-